package com.lmk;

import java.util.Scanner;

public class AnimalText {

    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);


        System.out.println("欢迎来到宠物店");
        System.out.println("请输入要领养的宠物名字：");
        String name=sc.next();
        System.out.print("请选择要领养的宠物类型：（1.狗狗 2.企鹅）");
        int choose=sc.nextInt();
        switch (choose){
            case 1:
                System.out.print("请选择狗的品种1.聪明的拉布拉多  2.酷酷的雪纳瑞");
                choose=sc.nextInt();
                Animals dog=new Animals();
                dog.setName(name);
                dog.setStrain(choose==1?"拉布拉多":"雪纳瑞");
                System.out.println(dog);
                break;
            case 2:
                System.out.print("请选择企鹅的品种1.q仔  2.q妹");
                choose=sc.nextInt();
                Penguin penguin=new Penguin();
                penguin.setName(name);
                penguin.setStrain(choose==1?"q仔":"q妹");
                System.out.println(penguin);
break;
        }
    }
}
